Skip to content

Conversation

@barluq
Copy link
Collaborator

@barluq barluq commented Jan 9, 2026

This pull request introduces several important enhancements and standardizations to the shared TypeScript library, focusing on improving logging, utility functions, and repository documentation and guidelines. The most significant changes include a complete refactor of the logging utilities, the addition of new URL and date helper functions, and the introduction of comprehensive repository and coding instructions. There are also updates to dependencies and minor cleanups.

Logging improvements:

  • Refactored the logger implementation in src/node/logging/logger.ts to replace the AppLogger class with a set of functional, leveled logging utilities (loggyInfo, loggyDebug, loggyWarn, loggyTrace, loggyError, loggyFatal, loggyAppStart, loggyRequestReceived, loggyResponseSent). These provide more granular and flexible logging for Node.js applications. ([src/node/logging/logger.tsL1-R141](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-e60e8bac8c505a9174a439038848d23a1d2bbfa242e49ae6aa004b3a9e4d7555L1-R141))
  • Updated src/index.node.ts to export the new logging functions instead of the previous class and type. ([src/index.node.tsL11-R11](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-ab1d6894726b864036e597060eeb8f2fcb96027911cf36c14b22e102980a5658L11-R11))

Utility function additions:

  • Added isUrl and isArrayOfUrls helper functions to src/globals/coding/code.formating.ts for URL validation, and exported them in src/index.browser.ts. ([[1]](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-7b6cdade1c6655707a42a706db92f381f6c2e92cf7b1dcbcf69827380d9bbfa6R1-R21), [[2]](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-21ccc5f340d04ed35285bc4345802864b3534f9662a2e9c2451bd59ec0896884L12-R22))
  • Introduced nowPlusTime in src/globals/coding/code.dates.ts to compute a future/past timestamp by adding seconds to the current time, and exported it in src/index.browser.ts. ([[1]](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-d350bbb0bb8728ce07a8e87aa8830d46336ac74ba1c281566a15560fc8359aebR14-R22), [[2]](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-21ccc5f340d04ed35285bc4345802864b3534f9662a2e9c2451bd59ec0896884L12-R22))

Repository documentation and guidelines:

  • Added detailed repository and agent instructions in .github/copilot-instructions.md and AGENTS.md, outlining repository structure, build, testing, and coding standards. ([.github/copilot-instructions.mdR1-R48](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-227c2c26cb2ee0ce0f46a320fc48fbcbdf21801a57f59161b1d0861e8aad55f5R1-R48))
  • Introduced new instructional files: .github/instructions/build.instructions.md, .github/instructions/coding.instructions.md, and .github/instructions/testing.instructions.md, providing explicit build, coding, and testing guidelines for contributors. ([[1]](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-ff1a5ea86cba912472dc863f89e8fcdd0e5f3c8b0d3adcdf366062170c4a9ef2R1-R15), [[2]](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-59ceb5614a0acc3fbc17c325d1c2b1d901136704f1aaef9960c5f9137d130bffR1-R17), [[3]](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-96340ffca94eca2de77908cabb6fb7e7b0ef3589aa61d38bcc64e6a354fa4542R1-R23))

Dependency and configuration updates:

  • Updated package.json to version 0.0.3-dev.0, adjusted peer and dev dependencies, and removed unused packages such as pino-pretty and barrelsby. ([[1]](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L3-R3), [[2]](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L37-L55), [[3]](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R60))
  • Removed the unused barrelsby.json configuration file. ([outdated/barrelsby.jsonL1-L9](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-9620fe393ef41e3975c9747f8c3bc884aef2bd16fc2441f13be1d5d53ef8c0e0L1-L9))
  • Cleaned up rollup.config.js by removing the unused @rollup/plugin-commonjs import. ([rollup.config.jsL4](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-6814bf77564b4f1c92f5861e184e28fe217c080a047fefa8b73a728f755ec45cL4))

Minor configuration changes:

  • Minor formatting fix in eslint.config.mjs for consistency. ([eslint.config.mjsL22-R22](https://github.com/Gisat/ptr-be-core/pull/32/files#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2L22-R22))

These changes collectively improve the maintainability, clarity, and robustness of the codebase, while providing clear guidelines for future development.

barluq and others added 17 commits January 2, 2026 13:29
…ports in index.node.ts; add comprehensive Copilot instructions and build guidelines
- Removed unused peer dependency 'pino-pretty' from peerDependencies.
- Cleaned up devDependencies by removing 'barrelsby' and 'typescript-eslint' duplicate entry.
- Added '@types/luxon' and '@types/node' to devDependencies for better type support.
- Removed the import of '@rollup/plugin-commonjs' from rollup.config.js as it was not being used.
Optimize logger by creating single pino instance at module scope
@barluq barluq closed this Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants